using System.Runtime.InteropServices; 
using System.Text;
// ERROR: Not supported in C#: OptionDeclaration static class Module1 
namespace VCRTest
{ 
    public static class Module_DLL
    {
    
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short CVR_InitComm(int Port); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short CVR_CloseComm(); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short CVR_Authenticate(); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short CVR_Read_Content(int Active); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short CVR_Ant(int mode); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short GetPeopleName(string lpReturnedString, ref short nReturnLen); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short GetPeopleAddress(string lpReturnedString, ref short nReturnLen); 
    //[DllImport("termb.dll", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern short GetPeopleIDCode(string lpReturnedString, ref short nReturnLen); 
    //[DllImport("user32", EntryPoint = "SendMessageA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)] 
    //public static extern int SendMessage(int hwnd, int wMsg, int wParam, ref object lParam); 

        [DllImport("termb.dll")]
        public static extern short CVR_InitComm(int port);
        [DllImport("termb.dll")]
        public static extern short CVR_CloseComm();
        [DllImport("termb.dll")]
        public static extern short CVR_Authenticate();
        [DllImport("termb.dll")]
        public static extern short CVR_Read_Content(int Active);
        [DllImport("termb.dll")]
        public static extern short CVR_Ant(int mode);
        [DllImport("termb.dll")]
        public static extern short GetPeopleName(StringBuilder lpReturnedString,ref short nReturnLen);
        [DllImport("termb.dll")]
        public static extern short GetPeopleAddress(StringBuilder lpReturnedString, ref short nReturnLen);
        [DllImport("termb.dll")]
        public static extern short GetPeopleIDCode(StringBuilder lpReturnedString, ref short nReturnLen);
        [DllImport("termb.dll")]
        public static extern short GetPeopleSex(StringBuilder lpReturnedString, ref short nReturnLen);
        [DllImport("termb.dll")]
        public static extern short GetPeopleBirthday(StringBuilder lpReturnedString, ref short nReturnLen);
        [DllImport("termb.dll")]
        public static extern short GetPeopleNation(StringBuilder lpReturnedString, ref short nReturnLen);

        [DllImport("user32", EntryPoint = "SendMessageA", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
        public static extern int SendMessage(int hwnd, int wMsg, int wParam, ref object lParam);

        [DllImport("termb.dll")]
        public static extern short CVR_ReadBaseMsg(StringBuilder pucCHMsgb, short puiCHMsgLen, StringBuilder pucPHMsg, short puiPHMsgLen, int mode);

        [DllImport("termb.dll")]
        public static extern short Getbase64BMPData(StringBuilder lpReturnedString, ref short nReturnLen);
    }
}  